﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using BesAsm.Emgaats.Tools;
using BesAsm.Framework.Reporting;

namespace BesAsm.Emgaats.Core
{
  public class UIManageLayerFilesButton : ESRI.ArcGIS.Desktop.AddIns.Button
  {
    private EmgaatsCoreExtension _ext;

    public UIManageLayerFilesButton()
    {
      _ext = EmgaatsCoreExtension.GetExtension();
    }

    protected override void OnClick()
    {
      try
      {
        ManageLayersForm mlf = new ManageLayersForm();
        mlf.ShowDialog();
      }
      catch (Exception ex)
      {
        Messenger.ReportMessage("Error using Layer Files Manager: " 
          + ex.Message, ReportableMessageType.Error);
      }
    }

    protected override void OnUpdate()
    {
    }
  }
}
